<%--
  Created by IntelliJ IDEA.
  User: Edward
  Date: 2020/6/24
  Time: 17:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>客户信息列表</title>
    <style type="text/css">
        .table .box{
            border: beige 2px solid;
            width: 85%;
            margin: auto;
            text-align: center;

        }

        .table{
            background-color: beige;
            width: 1200px;
            margin: 0 auto;
          }
        .search{
            margin: 0 auto;
        }
    </style>
</head>
<body>

    <div class="table">
        <div class="search">
            <form method="get" action="${pageContext.request.contextPath}/customer/customerList">
                <input type="text"placeholder="请输入你需要查找的信息" name="name">
                <input type="submit" value="搜索">
            </form>
        </div>
        <table class="box" border="1px" cellpadding="0" cellspacing="0" >
            <tr>
                <td>用户名</td>
                <td>联系人</td>
                <td>电话</td>
                <td>手机号码</td>
                <td>住址</td>
                <td>创建时间</td>
                <td>年营业额</td>
                <td>修改客户</td>
            </tr>
            <c:forEach items="${custmer}" var="cust">
                <tr>
                    <td>${cust.custName}</td>
                    <td>${cust.custLinkman}</td>
                    <td>${cust.custPhone}</td>
                    <td>${cust.custMobile}</td>
                    <td>${cust.custAddress}</td>
                    <td>${cust.custCreatetime}</td>
                        <c:if test="${cust.custIndustry==1}">
                    <td>10~20万</td>
                    </c:if>
                    <c:if test="${cust.custIndustry!=1}">
                        <td>20~30万</td>
                    </c:if>
                    <td>
                        <input type="button" value="删除" onclick="location.href='${pageContext.request.contextPath}/customer/deleteCustomer?id=${cust.custId}'">
                        <input type="button" value="修改" onclick="location.href='${pageContext.request.contextPath}/customer/toEdit?id=${cust.custId}'">
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>
</body>
</html>
